from urllib import request
start = "12345"
i = 0
while True:
    curr_url = f"http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing={start}"
    res = request.urlopen(curr_url)
    content = res.read().decode('utf-8').split()
    start = content[-1]
    # print(i, start) 运行时，可将此解开，可以看到具体的变化
    i += 1 
    if "html" in start:
        break
print(content) # peak.html